import java.util.Arrays;
import java.util.Comparator;

class Intcmp1 implements Comparator<Integer>{
    @Override
    public int compare(Integer o1, Integer o2) {
        return o2.compareTo(o1);
    }
}

public class Test {
    public static void main(String[] args) {
        int arr[]={ 27,15,19,18,28,34,65,49,25,37 };
        TestHeap testHeap=new TestHeap(3);
//        testHeap.initHeap(arr);
//        testHeap.createHeap();
/*        System.out.println("");
        testHeap.offer(3);
        System.out.println("");
        System.out.println(testHeap.poll());
        System.out.println(testHeap.poll());*/
        int ret1[]=testHeap.maxestK(arr,3);
        System.out.println(Arrays.toString(ret1));
        System.out.println("");//大堆
        int ret2[]=testHeap.smallestK(arr,3);
        System.out.println(Arrays.toString(ret2));

    }
}
